<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateFotosTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateFotosLabel_idFoto}" for="idFoto" />
                    <h:inputText id="idFoto" value="#{fotosController.selected.idFoto}" title="#{bundle.CreateFotosTitle_idFoto}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_idFoto}"/>
                    <h:outputLabel value="#{bundle.CreateFotosLabel_detalhe}" for="detalhe" />
                    <h:inputText id="detalhe" value="#{fotosController.selected.detalhe}" title="#{bundle.CreateFotosTitle_detalhe}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_detalhe}"/>
                    <h:outputLabel value="#{bundle.CreateFotosLabel_nivel}" for="nivel" />
                    <h:inputText id="nivel" value="#{fotosController.selected.nivel}" title="#{bundle.CreateFotosTitle_nivel}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_nivel}"/>
                    <h:outputLabel value="#{bundle.CreateFotosLabel_fkUsuario}" for="fkUsuario" />
                    <h:selectOneMenu id="fkUsuario" value="#{fotosController.selected.fkUsuario}" title="#{bundle.CreateFotosTitle_fkUsuario}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_fkUsuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateFotosLabel_fkAlbum}" for="fkAlbum" />
                    <h:selectOneMenu id="fkAlbum" value="#{fotosController.selected.fkAlbum}" title="#{bundle.CreateFotosTitle_fkAlbum}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_fkAlbum}">
                        <f:selectItems value="#{albumController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateFotosLabel_data}" for="data" />
                    <h:inputText id="data" value="#{fotosController.selected.data}" title="#{bundle.CreateFotosTitle_data}" required="true" requiredMessage="#{bundle.CreateFotosRequiredMessage_data}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{fotosController.create}" value="#{bundle.CreateFotosSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{fotosController.prepareList}" value="#{bundle.CreateFotosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateFotosIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
